package cn.gx.kevin.domain;

import java.util.LinkedHashMap;
import java.util.List;

/***
 *@description : 动态dao 分页查询结果
 *@author : kevin.huang
 *@date : 2019/10/27 20:22
 @modified by
 ***/
public class DynamicPagingResult {

    /****当前页*****/
    public int getPage() {
        return page;
    }

    /****当前页*****/
    public void setPage(int page) {
        this.page = page;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
        long diff = this.total % this.pageSize;
        long t = this.total / this.pageSize;
        if(diff > 0){
            t++;
        }
        this.totalPage = t;
    }

    public long getTotalPage(){
        return this.totalPage;
    }

    int pageSize ;

    long totalPage;

    /****当前页*****/
    int page;

    /**总数***/
    long total;
    /*****列表*****/
    List<LinkedHashMap<String,Object>> list;

    /**总数***/
    public long getTotal() {
        return total;
    }

    /**总数***/
    public void setTotal(long total) {
        this.total = total;
    }

    /*****列表*****/
    public List<LinkedHashMap<String, Object>> getList() {
        return list;
    }

    /*****列表*****/
    public void setList(List<LinkedHashMap<String, Object>> list) {
        this.list = list;
    }


}
